{% extends "default.html" %}

{% load i18n %}
{% load jalali_view %}
{% load digg_paginator %}

{% block title %} {% trans "Ad Orders List" %}{% endblock %}

{% block page_content %}
<h3>{% trans "Ad Orders" %}</h3>
<table border="1" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th>{% trans "Paid" %}</th>
			<th>{% trans "Title" %}</th>
			<th>{% trans "Registration Date" %}</th>
			<th>{% trans "Publish Start Date" %}</th>
			<th>{% trans "Publish End Date" %}</th>
			<th>{% trans "Amount" %}</th>
			<th></th>
		</tr>
	</thead>
	{% for o in current_page.object_list %}
	<tr>
		<td>
		{% if o.paid %}
		<img src="/media/img/admin/icon-yes.gif" />
		{% else %}
		<img src="/media/img/admin/icon-no.gif" />
		{% endif %}
		</td>
		<td>{{ o.ad.title }}</td>
		<td>{% jalali_view o.ad.registration_date %}</td>
		<td>{% jalali_view o.ad.start_date %}</td>
		<td>{% jalali_view o.ad.end_date %}</td>
		<td>{{ o.amount }}</td>
		<td>
			{% if not o.paid %}
			<a href="/ads/orders/pay/{{ o.id }}/">{% trans "Pay" %}</a>
			{% endif %}
		</td>
	</tr>
	{% endfor %}
</table>

{% digg_paginator %}

{% endblock page_content %}
